package com.sitanyun.merchant.guide.frament.presenter.impl;

import com.sitanyun.merchant.guide.frament.model.impl.ScenHomeFramentFModelImpl;
import com.sitanyun.merchant.guide.frament.model.inter.IScenHomeFramentFModel;
import com.sitanyun.merchant.guide.frament.presenter.inter.IScenHomeFramentFPresenter;
import com.sitanyun.merchant.guide.frament.view.inter.IScenHomeFramentFView;
import com.sitanyun.merchant.guide.presenter.callback.CallBack;

public class ScenHomeFramentFPresenterImpl implements IScenHomeFramentFPresenter {
    private IScenHomeFramentFView mIScenHomeFramentFView;
    private IScenHomeFramentFModel mIScenHomeFramentFModel;

    public ScenHomeFramentFPresenterImpl(IScenHomeFramentFView fIScenHomeFramentFView) {
        mIScenHomeFramentFView = fIScenHomeFramentFView;
        mIScenHomeFramentFModel = new ScenHomeFramentFModelImpl();
    }

    @Override
    public void getLscenhome(String type) {
        mIScenHomeFramentFModel.setscenhome(type, new CallBack() {
            @Override
            public void onSuccess(Object response) {
                mIScenHomeFramentFView.response(response, IScenHomeFramentFView.REQUEST_ONE );
            }

            @Override
            public void onError(Throwable t) {
                mIScenHomeFramentFView.response(t, IScenHomeFramentFView.REQUEST_TWO );

            }
        });
    }
}
